package com.xing.binbackend.pattern.adapter24.operation;

import cn.hutool.json.JSONObject;

import java.time.LocalDateTime;

// 阿里云监控SDK
class AliyunSDK {
    public JSONObject queryMetricData(String metricType,
                                      String resourceId) {
        // 实际调用阿里云API
        return new JSONObject()
                .put("Value", 0.68)
                .put("Time", LocalDateTime.now());
    }

    public void createAlarmRule(String ruleName,
                                String metric,
                                String condition) {
        System.out.println("阿里云配置告警规则: " + ruleName);
    }
}
